package com.boot.system.wrapper;

import cn.hutool.core.bean.BeanUtil;
import com.boot.framework.common.BaseEntityWrapper;
import com.boot.system.dto.SysUserDTO;
import com.boot.system.entity.SysUserEntity;

/**
 * @author yangfan
 * @date 2024/1/7
 * @Description
 */
public class SysUserWrapper extends BaseEntityWrapper<SysUserEntity, SysUserDTO> {
    public static SysUserWrapper build() {
        return new SysUserWrapper();
    }

    @Override
    public SysUserDTO entityDTO(SysUserEntity entity) {
        return BeanUtil.copyProperties(entity, SysUserDTO.class);
    }

    @Override
    public SysUserEntity dtoEntity(SysUserDTO dto) {
        return BeanUtil.copyProperties(dto, SysUserEntity.class);
    }
}
